<?php
abstract class Bliss_Rcon_Game_Abstract extends Bliss_Rcon
{
	protected $protocolName;
	protected $protocol;

	public function __construct($ip, $port, $password)
	{
		parent::__construct($ip, $port, $password);
		if(!isset($this->protocolName)) {
			throw new Bliss_Rcon_Exception("No protocol defined.");
		}

		$protocol = "Bliss_Rcon_Protocol_{$this->protocolName}";
		$this->protocol = new $protocol();
		$this->init();
	}
	
	protected function init() {}

	abstract public function exec($command, array $args=null);

	abstract public function login();
}
?>